package com.my12306.user.dao.auth;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.user.model.po.auth.RolePermissionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author:苏牧夕
 * @Date:2020-05-15 17:36:13
 * @Version 1.0
 */
@Mapper
public interface RolePermissionDao extends BaseMapper<RolePermissionEntity> {
    /**
     * 批量添加角色和资源关系
     *
     * @param list
     * @return
     */
    Boolean savaBatchRolePerms(List<RolePermissionEntity> list);

    /**
     * 批量删除角色和资源
     *
     * @param list
     * @return
     */
    Boolean deleteBatchRolePermByRoleIds(@Param("list") List<Long> list);

    void deleteBatchRolePermByPermIds(@Param("list") List<Long> list);
}
